# -*- encoding:utf-8 -*-
import datetime

import service.cubeinfo.crcrunner as cubeinfo
import service.sharerank.srcrunner as sharerank
import service.stockdebate.sdcrunner as stockdebate
import service.stocknews.sncrunner as stocknews
import service.stockprice.spcrunner as stockprice
__author__ = 'shudong.msd'


# 开始抓取
filepath = u'G:/毕业设计/数据/排行榜/'+str(datetime.date.today())+'.xls'

#抓取排行榜
sharerank.writeToDB()
sharerank.writeToDB_hot_asc()
sharerank.writeToExcel(filepath)

# 抓取价格
#stockprice.writeToDB()
print stockprice.writeToDB_xueqiu()


# 抓取组合信息
print cubeinfo.write_cube_name()

print cubeinfo.writeToDBWithRank()
print cubeinfo.writeToDBWithInfo()
print cubeinfo.writeStockGroupForCube()

# 抓取新闻
print stocknews.write_sina_news()
print stocknews.write_east_news()

# 抓取股吧博客
print stockdebate.write_debate_to_db()
print stockdebate.write_east_debate_to_db()
